﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Acamps.Framework.BancoDados;

namespace Acamps.Framework.SessionFactory
{
    public class AcessoDados
    {
        private acampsEntities _entities;
        private string _connectionString;

        internal acampsEntities Entidade
        {
            get { return _entities; }
            set { _entities = value; }
        }

        internal string ConectionString
        {
            get { return _connectionString; }
        }

        internal AcessoDados(string conection)
        {
            _connectionString = conection;
            Entidade = new acampsEntities(conection);
        }

        internal void SalvarAlteracoes()
        {
            Entidade.SaveChanges();
        }
    }
}
